keep = ls()
oldwd = getwd()

#Set working directory
setwd('./data/suffrage_referenda')

##############################
#Make Suffrage Referenda Data#
##############################

#1: Collapse electoral returns to township clusters (public data)
source('./make/make_township_suffrage_votes.R')

#2: Generate IA and WI soldier treatment data (restricted)
#Absolute path to file containing ACWRD tables
if (use_restricted) {
  source('./make/make_treatment_data_ia_wi.R')
}

#3: Link Soldiers to Townships (restricted)
if (use_restricted) {
  source('./make/make_township_data.R')
}

#########
#Cleanup#
#########

rm(list = setdiff(ls(), c(keep, 'keep')))
setwd(oldwd)